@echo off
Title menu MySQL - By Ragnatharr
color 0f
cls
:menu
echo ###################
echo ##[ Menu  MySQL ]##
echo ###################
echo 1) Add service
echo 2) Delete service
echo 3) Restart mysql
echo 4) Start mysql
echo 5) Stop mysql
echo 6) Exit
set /p menup=Enter a option: 
if %menup%==6 exit
if %menup%==5 goto stop
if %menup%==4 goto start
if %menup%==3 goto restart
if %menup%==2 goto delete
if %menup%==1 goto add

:add
echo Import database folders copying "data\X", save "my.ini" for configuration, and move "lib\libmysql.dll" to apache folders
pause
cls
bin\mysqld --install MySQL --defaults-file=%CD%\my.ini
goto menu

:delete
cls
bin\mysqladmin -u root shutdown
bin\mysqld --remove
goto menu

:restart
cls
NET STOP MySQL
NET START MySQL
goto menu

:start
cls
NET START MySQL
goto menu

:stop
cls
NET STOP MySQL
goto menu